package cn.iocoder.yudao.module.system.controller.admin.userretention.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户留存率统计响应VO
 *
 * @author 系统
 */
@Schema(description = "管理后台 - 用户留存率统计响应VO")
@Data
@ExcelIgnoreUnannotated
public class UserRetentionRespVO {

    @Schema(description = "编号", example = "1")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "用户ID", example = "1024")
    @ExcelProperty("用户ID")
    private Long userId;

    @Schema(description = "用户名", example = "testuser")
    @ExcelProperty("用户名")
    private String username;

    @Schema(description = "用户类型", example = "1")
    @ExcelProperty(value = "用户类型", converter = DictConvert.class)
    @DictFormat("user_type")
    private Integer userType;

    @Schema(description = "兑换码ID", example = "1")
    @ExcelProperty("兑换码ID")
    private Integer codeId;

    @Schema(description = "兑换码", example = "ABC123")
    @ExcelProperty("兑换码")
    private String code;

    @Schema(description = "兑换码使用日期")
    @ExcelProperty("兑换码使用日期")
    private LocalDate codeUsageDate;

    @Schema(description = "留存状态", example = "1")
    @ExcelProperty(value = "留存状态", converter = DictConvert.class)
    @DictFormat("retention_status")
    private Integer retentionStatus;

    @Schema(description = "3日留存")
    @ExcelProperty("3日留存")
    private Boolean retention3Days;

    @Schema(description = "7日留存")
    @ExcelProperty("7日留存")
    private Boolean retention7Days;

    @Schema(description = "15日留存")
    @ExcelProperty("15日留存")
    private Boolean retention15Days;

    @Schema(description = "总登录天数", example = "10")
    @ExcelProperty("总登录天数")
    private Integer totalLoginDays;

    @Schema(description = "连续登录天数", example = "5")
    @ExcelProperty("连续登录天数")
    private Integer consecutiveLoginDays;

    @Schema(description = "最后登录时间")
    @ExcelProperty("最后登录时间")
    private LocalDateTime lastLoginTime;

    @Schema(description = "计算时间")
    @ExcelProperty("计算时间")
    private LocalDateTime calculatedTime;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @ExcelProperty("更新时间")
    private LocalDateTime updateTime;
}